#pragma once

#include "Defs.h"
#include "IntegrableInterface.h"

namespace PHYOgre
{

class Particle : public IntegrableInterface
{
public:
	Particle();

	void SetNode(Ogre::Node *iNode);
	void Integrate(const Real& iDT);
	bool HasFiniteMass() const;
	Real GetInverseMass() const;
	void AddForce(const Vector3& iForce);

	void SetPosition(const Vector3& iPosition);
	void SetVelocity(const Vector3& iVelocity);
	void SetAcceleration(const Vector3& iAcceleration);
	
	Vector3 GetPosition()const;
	Vector3 GetVelocity()const;
	void SetDampling(const Real& iDampling);
	void SetMass(const Real& iMass);
	void SetInverseMass(const Real& iInverseMass);

	void ClearForceAccumulator();
	void SetShape(Shape* iShape);
	const Shape* GetShape() const;
	const Ogre::Sphere& GetBoundingSphere() const;
	const Ogre::MovableObject& GetObject() const;

	
private:
//	Vector3 mPosition;
	Vector3 mVelocity;
	Vector3 mAcceleration;
	Vector3 mForceAccumulator;

	Real mInverseMass;
	Real mDampling;
	
	Ogre::Node *mNode;
	Ogre::MovableObject *mObject;
	Shape *mShape;
};

}